/**
 /**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.tb_driving_record.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.modules.tb_car_info.entity.TbCarInfo;
import com.thinkgem.jeesite.modules.tb_discharge_cargo_address.entity.TbDischargeCargoAddress;
import com.thinkgem.jeesite.modules.tb_goods.entity.TbGoods;
import com.thinkgem.jeesite.modules.tb_loading_address.entity.TbLoadingAddress;

/**
 * 车辆运输记录Entity
 * @author ZhangYangZe
 * @version 2017-06-09
 */
public class TbDrivingRecord extends DataEntity<TbDrivingRecord> {
	
	private static final long serialVersionUID = 1L;
	private String waybill;		// 订单ID
	private String carId;		// 车辆
	private String state;		// 出车状态0出车1装货2卸货3回库
	private Double mileage;		// 里程数
	private String goodsAddOrRemove;		// 装卸货地址
	private String goods;		// 货物
	private Double weight;		// 重量
	private Double loss;		// 亏损
	private String photoBig;		// 照片
	private String photoSmall;		// 照片
	private Date creatDate;		// 创建时间
	private Date beginCreatDate;		// 开始 创建时间
	private Date endCreatDate;		// 结束 创建时间
	
	private TbGoods tbGoods;
	private TbCarInfo tbCarInfo;//车
	private TbLoadingAddress tbLoadingAddress;//装货地址
	private TbDischargeCargoAddress tbDischargeCargoAddress;//卸货地址
	
	
	public TbGoods getTbGoods() {
		return tbGoods;
	}

	public void setTbGoods(TbGoods tbGoods) {
		this.tbGoods = tbGoods;
	}

	public TbCarInfo getTbCarInfo() {
		return tbCarInfo;
	}

	public void setTbCarInfo(TbCarInfo tbCarInfo) {
		this.tbCarInfo = tbCarInfo;
	}

	public TbLoadingAddress getTbLoadingAddress() {
		return tbLoadingAddress;
	}

	public void setTbLoadingAddress(TbLoadingAddress tbLoadingAddress) {
		this.tbLoadingAddress = tbLoadingAddress;
	}

	public TbDischargeCargoAddress getTbDischargeCargoAddress() {
		return tbDischargeCargoAddress;
	}

	public void setTbDischargeCargoAddress(TbDischargeCargoAddress tbDischargeCargoAddress) {
		this.tbDischargeCargoAddress = tbDischargeCargoAddress;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public TbDrivingRecord() {
		super();
	}

	public TbDrivingRecord(String id){
		super(id);
	}

	@Length(min=1, max=50, message="订单ID长度必须介于 1 和 50 之间")
	public String getWaybill() {
		return waybill;
	}

	public void setWaybill(String waybill) {
		this.waybill = waybill;
	}
	
	@Length(min=1, max=50, message="车辆长度必须介于 1 和 50 之间")
	public String getCarId() {
		return carId;
	}

	public void setCarId(String carId) {
		this.carId = carId;
	}
	
	@Length(min=1, max=1, message="出车状态0出车1装货2卸货3回库长度必须介于 1 和 1 之间")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
	public Double getMileage() {
		return mileage;
	}

	public void setMileage(Double mileage) {
		this.mileage = mileage;
	}
	
	@Length(min=0, max=50, message="装卸货地址长度必须介于 0 和 50 之间")
	public String getGoodsAddOrRemove() {
		return goodsAddOrRemove;
	}

	public void setGoodsAddOrRemove(String goodsAddOrRemove) {
		this.goodsAddOrRemove = goodsAddOrRemove;
	}
	
	@Length(min=0, max=50, message="货物长度必须介于 0 和 50 之间")
	public String getGoods() {
		return goods;
	}

	public void setGoods(String goods) {
		this.goods = goods;
	}
	
	public Double getWeight() {
		return weight;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}
	
	public Double getLoss() {
		return loss;
	}

	public void setLoss(Double loss) {
		this.loss = loss;
	}
	
	@Length(min=0, max=1000, message="照片长度必须介于 0 和 1000 之间")
	public String getPhotoBig() {
		return photoBig;
	}

	public void setPhotoBig(String photoBig) {
		this.photoBig = photoBig;
	}
	
	@Length(min=0, max=1000, message="照片长度必须介于 0 和 1000 之间")
	public String getPhotoSmall() {
		return photoSmall;
	}

	public void setPhotoSmall(String photoSmall) {
		this.photoSmall = photoSmall;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreatDate() {
		return creatDate;
	}

	public void setCreatDate(Date creatDate) {
		this.creatDate = creatDate;
	}
	
	public Date getBeginCreatDate() {
		return beginCreatDate;
	}

	public void setBeginCreatDate(Date beginCreatDate) {
		this.beginCreatDate = beginCreatDate;
	}
	
	public Date getEndCreatDate() {
		return endCreatDate;
	}

	public void setEndCreatDate(Date endCreatDate) {
		this.endCreatDate = endCreatDate;
	}
		
}